/*
 * EPoll.hpp
 *
 *  Created on: Nov 28, 2014
 *      Author: toti
 */

#ifndef EPOLL_HPP_
#define EPOLL_HPP_

#include <errno.h>
#include <sys/epoll.h>

#include <iostream>


class EPoll{

private:

	int efd;
	int bufferSize;
	struct epoll_event *eventBuffer;

public:

	EPoll(int bufferSize);

	void addFd(int fd, void *ptr);
	void remFd(int fd);

	int wait();
	struct epoll_event *getEventBuffer(uint32_t i);


};


#endif /* EPOLL_HPP_ */
